#include "DialogPoint.h"

DialogPoint::DialogPoint( wxWindow* parent, float* x, float* y  )
:
DialogPointTemplate( parent)
{
	this->x = x;
	this->y = y;
	this->ShowModal();

}

void DialogPoint::OnOkClick( wxCommandEvent& event )
{
	//get x and y coordinates
	wxString x_string = textCtrlPointX->GetLineText(0);
	wxString y_string = textCtrlPointY->GetLineText(0);
	
	//conversion to float
	float xx = atof(x_string.char_str());
	float yy = atof(y_string.char_str());
	
	//save values in memory
	*this->x = xx;
	*this->y = yy;
	
	this->EndModal(1);
		
}
